home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / C for beginners.adf / source / scan2.c < prev    next >
C/C++ Source or Header  |  1978-01-17  |  279b  |  15 lines

  1. /* scan1.c section 4.5 */
  2. void main()
  3. {
  4.    int input;
  5.  
  6.    printf ("Are you well?\n");
  7.    printf ("(1) = YES (2) = NO\n");
  8.    printf ("Number: ");
  9.    scanf  ("%d",&input);
  10.    if (input == 1)
  11.       printf ("That is very good\n");
  12.    else
  13.    printf ("I am sorry to hear that\n");
  14. }
  15.